<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateTcisTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('tcis', function (Blueprint $table) {
            $table->id();
            $table->unsignedInteger('car_id')->default(0)->comment('车辆id');
            $table->timestamp('need_start')->nullable()->comment('所需时间开始');
            $table->timestamp('need_end')->nullable()->comment('所需时间结束');
            $table->timestamp('tci_start')->nullable()->comment('交强险起始时间');
            $table->timestamp('tci_end')->nullable()->comment('交强险结束时间');
            $table->string('tci_address')->nullable()->comment('交强险地点');
            $table->decimal('tci_price',10,2)->default(0.00)->comment('交强险价格');
            $table->integer('tci_limit_year')->default(0)->comment('交强险年限');
            $table->text('contents')->nullable()->comment('项目');
            $table->text('images')->nullable()->comment('图片');

            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('tcis');
    }
}
